import BaseComponent from "../../app/baseComponent";
import { createSubpageComponent } from "../page.component";
import { AUILoading } from "./loading";

class UiExampleLoading extends BaseComponent {
    constructor(name) {
        super(name);
        this.methods = {
            onChange(page) {
                console.log(page);
            }
        };
    }
    _template() {
        var self = this;
        return `<div class="${self._name}">
        <aui-loading ref="loading">
            sdssdsdsdsds
        </aui-loading>
</div>`;
    }
    _mounted() {
        var self = this;
        setTimeout(function() {
            self.$refs.loading.show = true;
        }, 1000);
    }
    _data() {
        var ret = {};       
        return ret;
    }
}

AUILoading.install();

window.AUICustomComponents.define("ui-example-loading", UiExampleLoading);

export default createSubpageComponent(
    `<ui-example-loading></ui-example-loading>`
);